package com.base.cn.platform.os.common.utils.course;

/**
 * 素材类型
 *
 * @author s.li
 * @date 2019/04/01
 */
public enum MaterialType {

    TYPE_KEY_LIVE ("LIVE","直播"),
    TYPE_KEY_VIDEO("VIDEO","视频"),
    TYPE_KEY_AUDIO("AUDIO","音频"),
    TYPE_KEY_ARTICLE("ARTICLE","文章");

    private String key;
    private String value;

    MaterialType(String key,String value){
        this.key = key;
        this.value = value;
    }

    public static String getValues(String key){
        for(MaterialType materialType : values() ){
            if(materialType.getKey().equals(key)){
                return materialType.getValue();
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
